﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieRental.Entities;

namespace MovieRental.BuisnessComponents.Exceptions
{
    public class FieldValueRangeException<T> : DataValidationException
    {
        public FieldValueRangeException(BaseEntity<Guid> obj, string fieldName, T lowBound, T topBound)
            : base("The \"{0}\" field of \"{1}\" should be from " + lowBound.ToString() + " to " + topBound.ToString(), obj, fieldName, null)
        {
        }

        public FieldValueRangeException(BaseEntity<Guid> obj, string fieldName)
            :base("The \"{0}\" field value of \"{1}\" is invalid.", obj, fieldName, null)
        {
        }
    }
}
